<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>使用css3的基本选择器</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        .clearfix:after,.clearfix:before{
            display: table;/*作为块级表格显示*/
            content: "";
        }
        .clearfix:after{
            clear: both;
            overflow: hidden;
        }
        .demo{
            width: 250px;
            border:1px solid #ccc;
            padding: 10px;
            margin:20px auto;
        }
        li{
            background: #ff3366;
            list-style: none outside none;/*缩写的三个参数分别是类型type，位置，替换图片*/
            float: left;
            height: 20px;
            line-height: 20px;
            width: 20px;
            border-radius: 10px;
            text-align: center;
            color: green;
            margin-right: 5px;
        }
        .demo *{
            background: orange;
        }
        ul{
            background: gray;
        }
        #first{
            background: lime;
            color: black;
        }
        #last{
            background: black;
            color: lime;
        }
        .item{
            background: green;
            color: white;
            font-weight: bold;
        }
        .important{
            background: red;
        }
        ul
    </style>
</head>
<body>
<ul class="clearfix demo">
    <li class="first" id="first">1</li>
    <li class="active">2</li>
    <li class="important item">3</li>
    <li class="important">4</li>
    <li class="item">5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
    <li>9</li>
    <li class="last" id="last">10</li>
</ul>
</body>
</html>